<template>
  <div id="app">
      <router-link to="/user/123">用户123</router-link>
      <router-link to="/user/456">用户456</router-link>
      <button @click="goToDashboard">点击跳转Dashboard </button>
      <button @click="goBack">返回上一页</button>
    <router-view/>
  </div>
</template>

<script>
export default {
    methods:{
      goBack:function(){
        this.$router.go(-1)
      },
      goToDashboard:function(){
        this.$router.push({
          path: "/dashboard"
        })
      },
    },
}
</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
	padding: 30px;
}

#nav a {
	font-weight: bold;
	color: #2c3e50;
}

#nav a.router-link-exact-active {
	color: #42b983;
}
</style>
